As flash memories are scaled down to meet requirements for higher integration, the number of bits stored in each memory cell increases, thereby reducing a read margin between program states and increasing read errors. Accordingly, attempts have been made to accurately and quickly correct read errors. However, as logic circuits for correcting read errors are attached to flash memories, sizes of chips of the flash memories are increased.